Skip to content

refactor(examples): remove search from the workshop and venue lists - #396

Merged
pdevito3 merged 1 commit into
mainfrom
refactor/examples-no-search
Nov 1, 2026
Merged

pdevito3 merged 1 commit into
mainfrom
refactor/examples-no-search

Conversation

@pdevito3

@pdevito3 pdevito3 commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Why

A list in the template had two ways to query by text: a search param and QueryKit filters. QueryKit 1.17.1 lets a filter hold any text, so the user decided to keep only filters. #394 taught the filter builder the padded raw string, and #395 removed search from the generator. This PR removes it from the workshop and venue examples, the SPA, and the docs. It is the last step.

What changed

Server

  • search is gone from WorkshopParametersDto, VenueParametersDto, GetWorkshopList (handler, HTTP, MCP), and GetVenueList (handler, HTTP).
  • The list_workshops MCP filters description now tells a caller how to write text with a ", in the words the generator uses.

SPA

  • For a user, nothing changes. The workshops search box, its ?search= URL param, and the venue picker work as before.
  • The request now sends filters=title @=* "..." (venues: name), and the new containsText<T>(field, text) builds it. T is the DTO, so a field name that the DTO does not have fails the build.
  • quoteText moved to frontend/src/lib/querykit-text.ts. The filter builder and containsText use that one encoder.
  • The ?search= schema keeps the max length of a title, so a longer URL search falls back to the whole list, as it did before.
  • The empty state no longer says No workshop has "" in its title. for a URL search of only spaces.
  • The Kubb client and the OpenAPI document are regenerated.

Tests

  • WorkshopListQueryTests and VenueListQueryTests now prove case, %, _, and \ through filters, with QueryKitText.Quote. The NUL and lone-surrogate refusals now name the filters param.
  • The search max-length tests are gone with the limit. QueryInputErrorTests and QueryKitInputExtensionsTests already cover the filters limit.
  • The new unit test querykit-text.test.ts covers quotes at the ends, %_, a run of three quotes, trimming, and blank text.
  • workshop-list.test.tsx has a test for a URL search longer than a title. It fails without the limit.

Docs and skills

  • features-and-cqrs.md "Search text" now says that a list finds text through filters. LikePattern stays the rule for any raw ILike.
  • Also updated: backend.md, frontend.md, client-state.md, server-state.md, testing.md, the frontend-feature and writing-tests skills, and the verify skill workshops feature and recipe.

Breaking change

Update each caller that sends search to GET /api/v1/workshops, GET /api/v1/venues, or the list_workshops MCP tool. Send filters=title @=* "text" instead. An old search param is ignored without an error, so the caller gets the whole list.

Not changed

LikePattern, its banned-symbol rule, and its tests stay. After this PR, no production code calls LikePattern. Whether to delete it is an open call for the maintainer.

Local runs

With the examples kept:

  • dotnet build: 0 warnings.
  • dotnet test --solution: 2598 of 2598 passed.
  • pnpm lint and pnpm build: pass.
  • pnpm test: 524 passed.
  • The examples e2e specs: 368 passed.
  • The api-contract steps gave no diff.

With the examples removed:

  • pnpm test: 506 passed.
  • pnpm test:e2e: 183 passed.
  • The new-feature steps gave no diff on the second run.
  • dotnet test: 1997 of 1997 passed.

After the review, I ran the frontend example and lib tests again: 186 passed.

The workshop and venue lists now have one query path for text: QueryKit
filters. The search parameter, its max length, and its LikePattern code
are gone from the parameters DTOs, the handlers, and the HTTP and MCP
entrypoints. The MCP filters description of list_workshops tells a
caller how to write text with a quote, in the words of new-feature.cs.

The SPA keeps its search box, its search URL param, and the text box of
the venue picker. The list hooks send the text as a title or name
filter with containsText. quoteText moves from the filter builder to
frontend/src/lib/querykit-text.ts, so the filter builder and the lists
share one encoder. Each box takes its max length from the field that
its filter matches.

The list query tests find text through a filter that QueryKitText.Quote
writes, and keep each guarantee: case does not matter, %, _, and \ are
plain text, and NUL and a lone surrogate map to the filters parameter.

LikePattern, its banned-symbol rule, and its tests stay. The docs now
say that a list finds text through filters, and that LikePattern is the
rule for a raw ILike.
@pdevito3

pdevito3 commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner Author

Independent verification of 3114d20: PASS+NOTES

Goal checked: the workshops search box and the venue picker find text as before, and only the request changes (it sends filters, never search).

How. Isolated stack from origin/refactor/examples-no-search (ZeroFactor, dev build), driven in real Chromium with verify-fullstack-template. The examples/workshops.mjs recipe passed, and sweep.sh on it passed (both the web font and the fallback font runs). A custom recipe then started a tenant, added a venue "Q" Hall 01 through the UI, seeded 14 more venues and 9 workshops through the BFF, and typed each search into the box. It passed 26 of 26 steps with no page or console error. The only network.log line is the expected 404 of GET /api/v1/users/by-identifier/{sub} before onboarding.

Search box on /workshops. Each row is what the user typed, the filters value the SPA sent, and the rows shown. The shown rows matched the API body each time.

Typed filters sent Rows shown
"Quoted" title @=* """ "Quoted" """ "Quoted"
Quoted title @=* "Quoted" "Quoted", Quoted
QUOTED title @=* "QUOTED" "Quoted", Quoted
quote" title @=* """ quote" """ quote"
50% off title @=* "50% off" 50% off (not 500 off)
a_b title @=* "a_b" a_b (not axb)
c\d title @=* "c\d" c\d (not cd)
axb title @=* "axb" axb
zzz none title @=* "zzz none" empty text No workshop has "zzz none" in its title.
no"match title @=* """ no"match """ empty text No workshop has "no"match" in its title.

All 50 requests (GET and POST) to /api/v1/workshops and /api/v1/venues were logged. None carried search=.

URL reloads.

  • The URL the app wrote for "Quoted" (?search=%22%5C%22Quoted%5C%22%22) reloads with "Quoted" in the box, the raw-string filter, and 1 row. The app-written URL for quote" (?search=quote%22) also reloads to 1 row.
  • ?search= with 300 characters goes to /workshops. The box is empty, the request has no filters, all 9 rows show, and no alert or console error appears.
  • ?search=%20%20%20 on a tenant with no workshops shows No workshops yet. Add one with New workshop., not No workshop has "" .... With 9 workshops the same URL shows the whole list, and the request has no filters.

Venue picker (new workshop form). Typing "Q" sent name @=* """ "Q" """ for page 1 and page 2 (page size 10). The list then held 12 options, and each one contains "Q". The 3 control venues Q Hall plain N were not in it. Picking "Q" Hall 12 with a click set the combobox value. Q Hall plain sent name @=* "Q Hall plain" and listed only the 3 controls, plus the current pick, which the code keeps by design.

Breaking change, recorded. Through the BFF, GET /api/v1/workshops?search=x returns 200 with all 9 workshops, the same IDs as with no params. GET /api/v1/venues?search=x returns 200 with all 15 venues. The param is ignored, as the PR says.

Pixels. I read the screenshots of the full list, a filtered list, both empty states, the empty tenant with a spaces URL, and the picker open on 12 results and on the plain search. The alignment, spacing, and clear button look right, and the sweep found no layout or focus fault. Nothing looks off.

Notes (none block the merge).

  1. A hand-typed ?search=%22Quoted%22 searches Quoted (2 rows), not "Quoted". TanStack Router reads a search value that parses as JSON as JSON, so the outer quotes are lost. The app writes its own URLs JSON-encoded, so they round-trip. I infer that this is router behavior that predates this PR, because nothing in the diff touches the parse. I did not run main to confirm.
  2. With 12 matches, the picker fetches page 2 right after page 1, because the load-more row is inside the list viewport. This is correct, but "paging" in this test means the second fetch and the 11th and 12th options, not a user scroll.
  3. I tested the picker on the create form only, not the edit form.

Evidence (local): /Users/paul/repos/FullstackTemplate-worktrees/verify-396-evidence/ has search-text-3/ (the passing run, with screenshots, ARIA, and a trace), search-text-requests.json, search-text-api.json, search-text-urls.json, search-text-handtyped.json, workshops/, workshops-sweep*/, and the recipe in recipes/search-text.mjs. The stack is stopped and the worktree is removed.

@pdevito3
pdevito3 merged commit 56c4140 into main Nov 1, 2026
36 of 37 checks passed
@pdevito3
pdevito3 deleted the refactor/examples-no-search branch November 1, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant